import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/shop',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/ShopList.vue'),
                    meta: { title: '门店管理' }
                },
                {
                    path: '/shoptarget',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/ShopTarget.vue'),
                    meta: { title: '门店业绩目标' }
                },
                {
                    path: '/area',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/AreaMaintenance.vue'),
                    meta: { title: '区域维护' },
                },
                {
                    path: '/counter',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/CounterMaintenance.vue'),
                    meta: { title: '柜台维护' },
                },
                {
                    path: '/commodity',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/CommodityArchives.vue'),
                    meta: { title: '商品档案' },
                },


                // {
                //     path: '/shopmontht',
                //     component: () => import('../components/page/ShopMonthT.vue'),
                //     meta: { title: '门店月目标' }
                // },
                // {
                //     path: '/shopdayt',
                //     component: () => import('../components/page/ShopDayT.vue'),
                //     meta: { title: '门店日目标' }
                // },
                {
                    path: '/user',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/UserList.vue'),
                    meta: { title: '用户管理' }
                },
                {
                    path: '/changepwd',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/ChangePwd.vue'),
                    meta: { title: '修改密码' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        }
    ]
});
